package com.rightsidetech.commom.enums;

public enum SMSTemplate {
   //Regist(注册)Back(找回密码)
    REGIST("Regist","code", "SMS_215338318"),
    BACK("Back","code", "SMS_215343292"),
    LOGIN("Login","code","SMS_114275068"),

    //COMMON通用验证码
    COMMON("Common","code", ""),
    REFUND_FAIL("RefundFail","failAmount,orderNo,servicePhone", ""),
    REFUND_SUCCESS("RefundSuccess","orderNo,servicePhone", ""),
    FREE_DEPOSIT_PASS("freeDepositPass","servicePhone", ""),
    FREE_DEPOSIT_REFUSE("freeDepositRefuse","refuseDes,servicePhone", "");

    // 成员变量
    private String content;
    private String templateId;
    private String name;

    // 构造方法
    SMSTemplate(String name, String content, String templateId) {
        this.name = name;
        this.content = content;
        this.templateId = templateId;
    }

    public String getContent() {
        return content;
    }

    public String getTemplateId() {
        return templateId;
    }

    public String getName() {
        return name;
    }

    public static SMSTemplate getByName(String name) {
        for (SMSTemplate enums : SMSTemplate.values()) {
            if (enums.getName().equals(name)) {
                return enums;
            }
        }
        return null;
    }

}
